package io.renren.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import io.renren.dao.LaborDisputeDao;
import io.renren.entity.LaborDisputeEntity;
import io.renren.service.LaborDisputeService;



@Service("laborDisputeService")
public class LaborDisputeServiceImpl implements LaborDisputeService {
	@Autowired
	private LaborDisputeDao laborDisputeDao;
	
	@Override
	public LaborDisputeEntity queryObject(Integer id){
		return laborDisputeDao.queryObject(id);
	}
	
	@Override
	public List<LaborDisputeEntity> queryList(Map<String, Object> map){
		return laborDisputeDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return laborDisputeDao.queryTotal(map);
	}
	
	@Override
	public void save(LaborDisputeEntity laborDispute){
		laborDisputeDao.save(laborDispute);
	}

	@Override
	public void update(LaborDisputeEntity laborDispute){
     String approveType=laborDispute.getIseffective();
    /* if("fir".equals(approveType)){
		 laborDispute.setIseffective(laborDispute.getFirAdjustResult());

	 }else if("sec".equals(approveType)){
		 laborDispute.setIseffective(laborDispute.getSecAdjustResult());

	 }else if("thi".equals(approveType)){
		 laborDispute.setIseffective(laborDispute.getArbitrationResult());

	 }*/
		laborDisputeDao.update(laborDispute);
	}
	
	@Override
	public void delete(Integer id){
		laborDisputeDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		laborDisputeDao.deleteBatch(ids);
	}
	
}
